//
//  HANetworkRequest.h
//  HAFund
//
//  Created by 夏成龙 on 2018/10/30.
//  Copyright © 2018年 夏成龙. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <AFNetworking.h>

typedef NS_ENUM(NSUInteger, HARequestType) {
    HARequestTypeGET,
    HARequestTypePOST
};

@interface HARequest : NSObject
/// 网络请求request
@property (strong, nonatomic) NSMutableURLRequest *request;
/// 请求头
@property (strong, nonatomic) AFHTTPRequestSerializer *requestHead;
/// 发送请求的task
@property (nonatomic, strong) NSURLSessionTask *task;


+ (instancetype)requestWithURLString:(NSString *)path params:(NSDictionary *)params type:(HARequestType)requestType;

- (instancetype)initWithURLString:(NSString *)path params:(NSDictionary *)params type:(HARequestType)requestType;

@end
